﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Office.Server.Diagnostics;

namespace Expertime.Multitude.Intranet.Utils
{
    public static class LogManager
    {

        public static void Log(PortalLogLevel level, string context, string msg)
        {
            //PortalLog.DebugLogString(level, "[Expertime] {0} - {1}", context, msg);
            PortalLog.LogString("[Expertime][{2}] {0} - {1}", context, msg, level);
        }

        public static void LogDebug(string context, string msg)
        {
            Log(PortalLogLevel.Information, context, msg);
        }

        public static void LogException(Exception ex, string msg)
        {
            Log(PortalLogLevel.Unexpected, msg, ex.Message);
        }
    }
}
